package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.entity.User;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from User where openid=#{openId}")
    User getByOpenId(String openId);

    void insert(User user);
    @Select("select * from user where id=#{userId}")
    User getById(Long userId);

    /**
     * 统计用户数据
     *
     */
    Integer countUser(LocalDateTime beginTime, LocalDateTime endTime);
}
